@using MvcCheckBoxList.Model
@model RepositoryDetailModel
@{
    ViewBag.Title = Resources.Repository_Clone_Title;
}
<h1>@Resources.Repository_Clone_Title</h1>

@using (Html.BeginForm("Clone", "Repository", new { id = ViewBag.ID }, FormMethod.Post, new { @class = "pure-form pure-form-aligned" }))
{    
    @Html.AntiForgeryToken()
    @Html.ValidationSummary(false, Resources.Repository_Clone_Fail)
    
    <fieldset>
        <div class="pure-control-group">
            @Html.LabelFor(m => m.Name)
            @Html.TextBoxFor(m => m.Name, new { autofocus = "" })<em>*</em>
            @Html.ValidationMessageFor(m => m.Name)
        </div>
        <div class="pure-control-group">
            @Html.LabelFor(m => m.Group)
            @Html.TextBoxFor(m => m.Group, new { @class = "medium" })
        </div>
        <div class="pure-control-group">
            @Html.LabelFor(m => m.Description)
            @Html.TextAreaFor(m => m.Description, new { @class = "medium" })
        </div>
        <div class="pure-control-group">
            @Html.LabelFor(m => m.AllowAnonymous)
            @Html.CheckBoxFor(m => m.AllowAnonymous)
            <i class="fa fa-info-circle" title="@Resources.Repository_AllowAnonymousHint"></i>
        </div>
        <div class="pure-control-group checkboxlist">
            @Html.LabelFor(m => m.Users)
            <span>
            	@Html.CheckBoxListFor(m => m.PostedSelectedUsers, mm => mm.AllUsers, mm => mm.Id, mm => mm.DisplayName, mm => mm.Users, Position.Vertical)
            </span>
            <i class="fa fa-info-circle" title="@Resources.Repository_UsersHint"></i>
        </div>

        <div class="pure-control-group checkboxlist">
            @Html.LabelFor(m => m.Administrators)
            <span>
            	@Html.CheckBoxListFor(m => m.PostedSelectedAdministrators, mm => mm.AllAdministrators, mm => mm.Id, mm => mm.DisplayName, mm => mm.Administrators, Position.Vertical)
            </span>
            @Html.ValidationMessageFor(m => m.Administrators)
            <i class="fa fa-info-circle" title="@Resources.Repository_AdministratorsHint"></i>
        </div>

        <div class="pure-control-group checkboxlist">
            @Html.LabelFor(m => m.Teams)
            <span>
            	@Html.CheckBoxListFor(m => m.PostedSelectedTeams, mm => mm.AllTeams, mm => mm.Id, mm => mm.DisplayName, mm => mm.Teams, Position.Vertical)
            </span>
            <i class="fa fa-info-circle" title="@Resources.Repository_TeamsHint"></i>
        </div>



        <div class="pure-controls">
            <a class="pure-button" href="@Url.Action("Index")"><i class="fa fa-long-arrow-left"></i> @Resources.Repository_Back</a>
            <button type="submit" class="pure-button pure-button-primary"><i class="fa fa-copy"></i> @Resources.Repository_Clone_Submit</button>
        </div>
    </fieldset>
}
